package edu.pku.sei.mte.mtemodel.mtmodel.expression;

import java.util.List;

import edu.pku.sei.mte.runtime.Context;
import edu.pku.sei.mte.utilities.Visitor;

public class ConstantExpression extends Expression {
	private Object value;

	public void collectReferedProperty(String root, List<String> coll) {
	}

	public Object evaluate(Context context, boolean enforce) {
		return value;
	}

	public Object evaluate(Context context, boolean enforce,
			Object expectedValue) {
		return value;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}
	
	@Override
	public Object accept(Visitor visitor) {
		return visitor.visitConstantExpression(this);
	}
}
